<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #box{
            width: 200px;
            height: 300px;
            background-color: aquamarine;
        }
    </style>
</head>
<body>
<div id="box"></div>
        <script>
            function hi(id) {
                return document.getElementById(id)
            }

      //     var $ = document.getElementById('box');
            var $ = hi('box');
            console.log($);
        </script>
</body>
</html>